
index($0, "[mysql]"){
    print
    while ((getline var) > 0 ){
        if( var ~ /\[.*\]/){
            exit
        }
        print var
    }
}